import React from 'react'
import {Switch,Route,Redirect} from "react-router-dom"
import Login from "./pages/login/login"
import Index from "./pages/index/index"
import Register from "./pages/register/register"
import List from "./pages/list/list"
import Cate from "./pages/cate/cate"
import Detail from "./pages/detail/detail"
import Search from "./pages/search/search"
import Shop from "./pages/shop/shop"
import Mine from "./pages/mine/mine"

export default function App() {
  return (
    <div>
      {/* 路由出口 */}
      <Switch>
        <Route path="/login" component={Login}></Route>
        <Route path="/index" component={Index}></Route>
        <Route path="/register" component={Register}></Route>
        <Route path="/list" component={List}></Route>
        <Route path="/detail" component={Detail}></Route>
        <Route path="/search" component={Search}></Route>
        <Route path="/shop" component={Shop}></Route>
        <Route path="/mine" component={Mine}></Route>
        <Route path="/cate" component={Cate}></Route>

        {/* 重定向 */}
        <Redirect to="/login"></Redirect>
      </Switch>
    </div>
  )
}
